package com.snopy.jvm.stack;

import lombok.extern.slf4j.Slf4j;

/**
 * @author snopy
 * @version 1.0.0
 * @classname DemoStackMemmory
 * @description
 * @email 77912204@qq.com
 * @date 2022/07/04 11:01
 */
@Slf4j
public class DemoStackMemmory {
    static volatile int count = 0;
    public static void main(String[] args) {

        try{
            new DemoStackMemmory().method();
        }catch (Throwable e){
            e.printStackTrace();
            log.debug("count:{}",count);
        }

    }
    private void method(){
        try {
            count++;
            method();
        }catch (Exception e){
            log.debug("count:{}",count);
        }

    }
}
